package com.tansun.easycare.rule.ruleflow.service;

import java.util.List;
import java.util.Map;

import com.tansun.easycare.rule.common.model.SelectEditorVo;
import com.tansun.easycare.rule.common.service.RuleBaseService;
import com.tansun.easycare.rule.exception.BizException;
import com.tansun.easycare.rule.ruleflow.entity.RuleFlow;
import com.tansun.easycare.rule.ruleflow.model.RuleFlowModel;
import com.tansun.easycare.rule.ruleflow.model.RuleFlowVO;
import com.tansun.easycare.rule.ruleflow.model.RuleNextTreeNode;
import com.tansun.easycare.rule.rulemange.entity.RuleManage;
import com.tansun.easycare.rule.ruleversion.entity.RuleVersioninfo;

/**
 * 规则流 服务管理器接口
 *
 * @author ZengWenfeng
 */
public interface RuleFlowService extends RuleBaseService<RuleFlow> {

    /**
     * 重新生成bpmn文件，用于规则包生成
     *
     * @param code 格式：规则流编号_版本号
     */
    void reCreateBpmn(String code) throws Exception;

    RuleFlowVO getRuleFlowData(RuleFlowModel model, Map<String,String> map) throws BizException;

    /**
     * 保存或更新规则流
     */
    RuleManage saveOrUpdate(RuleFlowModel ruleInfo) throws Exception;

    String showJavaCode(RuleFlowModel ruleInfo) throws BizException;
    /**
     * 获取发布版本
     */
    List<SelectEditorVo> getAllPublishVersion(RuleVersioninfo ruleVersioninfo) throws BizException;
    
    List<SelectEditorVo> getAllVersion(RuleVersioninfo ruleVersioninfo) throws BizException;
    

    /**
     * 查找规则流引用版本
     */
    List<RuleVersioninfo> findRuleFlowPublishVersion(String projectCode, String code, String version) throws BizException;
    
    
    public   Map<String,String>  findRuleRefeVersion(String projectCode, String code, String version) throws BizException;
    
    
    public  Map<String,String>  findRuleRefeVerByProjectCode(String  projectCode) throws BizException;
    
    public  List<String>  findRuleFlowRefeList(String projectCode, String code, String version) throws BizException;

	List<SelectEditorVo> getAllNewPublishVersion(RuleVersioninfo ruleVersioninfo) throws BizException;
	
	List<RuleNextTreeNode>  findTreeClassType(String projectCode,String  treeCode);

    int countListFindName(RuleFlowModel ruleInfo);

}